package com.hmk.demo.controller;

import com.hmk.demo.service.IDemoService;
import com.hmk.edu.mvcframework.annotations.HjyAutowired;
import com.hmk.edu.mvcframework.annotations.HjyController;
import com.hmk.edu.mvcframework.annotations.HjyRequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @className: DemoController
 * @Description: TODO
 * @author: Huangjianyun
 * @date: 2022/3/23 11:07
 */
@HjyController
@HjyRequestMapping("/demo")
public class DemoController {

    @HjyAutowired
    private IDemoService iDemoService;

    /*
    *
    * url: http://localhost:8080/demo/query
    *
    * */
    @HjyRequestMapping("/query")
    public  String query(HttpServletRequest request, HttpServletResponse response,String name){
        return   iDemoService.get(name);
    }

}
